package com.server.servlet.product;

import java.util.List;

import com.bean.Message;
import com.bean.Product;

public class FindAllProductServlet extends ProductServletImpl {
	
	private List<Product> all;
	
	@Override
	protected void success(Message msg) {
		msg.setAllProducts(all);
		super.success(msg);
	}

	@Override
	protected boolean isSuccess() {
		return all != null;
	}

	@Override
	protected void initData(Message msg) {
		all = service.findAll();
	}

}
